Torque's type map

Torque TypePostgreSQLMySQLOracleSybaseSapDBInterbaseHypersonicDB2DB2AS400CloudscapeaxionMS AccessMS SQL
Varchar*varcharVARCHARVARCHAR2VARCHARVARCHARVARCHARVARCHARVARCHARVARCHARVARCHARvarcharVARCHARVARCHAR
IntegerintegerINTEGERNUMBERINTINTEGERINTEGERINTEGERINTEGERINTINTINTEGERintegerINT
Numeric*numberDECIMALNUMBERNUMERICDECIMALn/aNUMERICNUMERICNUMERICNUMERICNUMERICNUMERICNUMERIC
DatedateDATETIMEDATEDATETIMEDATEn/aDATEDATEDATEDATEdatedateDATETIME
Float*floatFLOATFLOATFLOATFLOATn/aFLOATFLOATFLOATFLOATFLOATFLOATFLOAT
CharcharCHARCHARCHARCHARVARCHARVARCHARVARCHARVARCHARCHARVARCHARVARCHARCHAR
Blob n/a LONGBLOBBLOBn/aLONG BYTEn/an/aBLOBn/an/an/an/an/a
CblobtextLONGTEXTCBLOBn/aLONG UNICODEn/an/aCBLOBn/an/an/an/a
Binary*bytea-BLOBLONG RAWBINARYCHAR(254) BYTEn/aBINARYCHAR(n) FOR BIT DATAn/aLONG BINARYBINARYBINARYBINARY(7132)
BitbooleanBITNUMBER (1,0)BITFIXED(1,0)n/aBITn/an/aBITBITBITBIT
Booleanint*int2INTEGERNUMBERINTINTEGERINTEGERINTEGERINTEGERINTINTn/an/an/a
Booleanchar*charCHARCHARCHARCHARVARCHARVARCHARVARCHARVARCHARCHARn/an/an/a
Decimal*decimalDECIMALNUMBERDECIMALDECIMALn/aDECIMALDECIMALDECDECIMALINTEGERDECIMALDECIMAL
Longvarchar*bytea-MEDIUMTEXT-VARCHAR(2000)TEXTLONG VARCHARVARCHARVARCHARLONG VARCHARLONG VARCHARLONG VARCHARVARCHARMEMOTEXT
Real*floatREALNUMBERREALREALn/aREALREALREALREALREALREALREAL
Smallintint2SMALLINTNUMBER(5,0)SMALLINTSMALLINTn/aSMALLINTSMALLINTSMALLINTSMALLINTSMALLINTSMALLINTSMALLINT
Tinyint*int2TINYINTNUMBER(3,0)TINYINTCHAR BYTEn/aTINYINTn/aSMALLINTTINYINTTINYINTTINYINTTINYINT
Time*timeTIME-DATETIMESTAMPTIMEn/aTIMETIMETIMETIMEtimetimeDATETIME
Timestamp*timestampTIMESTAMPDATEDATETIMETIMESTAMPTIMESTAMPTIMESTAMPTIMESTAMPTIMESTAMPTIMESTAMPtimestamptimestampDATETIME
Varbinary*bytea-MEDIUMBLOB-BLOBIMAGELONG BYTEBLOBBINARYVARCHAR(n) FOR BIT DATAVARCHAR(n) FOR BIT DATALONG BINARYVARBINARYBINARYIMAGE

(*) indicates that size might be required

(-) indicates that type produced with *defined* length (bytea()) but *undefined* length required (bytea). This have only been checked on PostgreSQL and MySQL.

Note:

This table can be build from ${torque.home}/templates/base/${database}/db.props

Types java_object,null,other,array,ref,distinct have been removed, cause thay doesn't allow Torque-generator to produce SQL even if they exist in torque DTD.

See also : DataType on PostgreSQL.com, Data Type on mysql.com